// pages/index/fabu/fabu.js
let app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    go_publish(e) {

    
      let publish_type = e.currentTarget.dataset.type;
      console.log(publish_type);
      console.log(app.common.user_info)
      if (app.common.user_info.auth_status == 1) {
        app.toast("请先认证");
        setTimeout(() => {
          wx.navigateTo({
            url: '/pages/user/renzheng/renzheng'
          })
        }, 600);
        return
      } else if (app.common.user_info.auth_status == 2) {
        app.toast("认证资料审核中");
        return
      } else if (app.common.user_info.auth_status == 3) {
        if(app.common.user_info.role==1){
          app.toast("您的认证身份不能发布信息")
          return
        }
      } else if (app.common.user_info.auth_status == 4) {
        app.toast("认证未通过");
        return
      }
      if (publish_type == 0) {
        // 全职发布
        wx.navigateTo({
          url: '/pages/part_time/quanzhifabu/release'
        })
      }
      if (publish_type == 1) {
        // 兼职发布
        wx.navigateTo({
          url: '/pages/part_time/release/release'
        })
      }
    }
  }
})
